package cn.wolfcode.service;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.qo.PageResult;
import cn.wolfcode.qo.QueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

import java.util.List;

public interface IEmployeeService {
    void delete(Long id);
    void save(Employee employee, Long[] ids);
    Employee get(Long id);
    List<Employee> listAll();
    void update(Employee employee, Long[] ids);
    PageInfo<Employee> query(QueryObject qo);

    /**
     * 登录
     * @param username
     * @param password
     * @return
     */
    Employee login(String username, String password);

    /**
     * 批量删除
     * @param ids
     */
    void batchDelete(Long[] ids);

    /**
     * 根据员工用户名查询员工对象
     * @param name
     * @return
     */
    Employee selectByName(String name);

    /**
     * 导出
     * @return
     */
    HSSFWorkbook exportXls();

    /**
     * 导入
     * @param workbook
     */
    void importXls(HSSFWorkbook workbook);

    /**
     * 根据角色编码查询员工
     * @param sns
     * @return
     */
    List<Employee> selectByRoleSn(String... sns);
}
